import request from '@/utils/request'

//  *********企业新增*********
/**   接口名称目录              功能
     
**/
//list
export  const  listDepart = (search)=>
	request({
		url:'/op/office/get_office_list',
		method:'get',
		params: {
            
        }  
	})
// 新增 部门
export  const  submitAddDepart = (url,form)=>
	request({
		url,
		method:'post',
		data: JSON.stringify(
            form
        )  
	})
//删除 部门
export  const  delDepart = (code)=>
	request({
		url:'/op/office/delete_office',
		method:'get',
		params: {
			code
		} 
	})
	
//获取客户角色列表
export  const  RoleList = (search)=>
	request({
		url:'/sys/client_role/get_client_role_list' ,
		method:'get',
		params: {
            pageSize:search.pageSize	
        }  
	})
	
// 新增 部门
export  const  submitAddUser = (url,form)=>
	request({
		url,
		method:'post',
		data: JSON.stringify(
            form
        )  
	})
//获取用户列表	
export  const  listUser = (search)=>
	request({
		url:'/sys/user/get_user_list',
		method:'get',
		params: {
            pageNo:search.pageNo,
            pageSize:search.pageSize
        }  
	})

//获取指定的用户	
export  const  UserDetail = (code)=>
	request({
		url:'/sys/user/get_user',
		method:'get',
		params: {
            code
        }  
	})

//删除 用户	
export  const  delUser = (code)=>
	request({
		url:'/sys/user/delete_user',
		method:'get',
		params: {
			code
		} 
	})

export  const  optionUser = (url,code)=>
	request({
		url,
		method:'get',
		params: {
			code
		} 
	})
//option
export  const  RoleInit = (url,search)=>
	request({
		url,//获取角色列表
		method:'get',
		params: {
			pageNo:search.pageNo,
			pageSize:search.pageSize,
			keyWord:search.keyWord
		} 
	})

export  const  submitAddRole = (url,form)=>
	request({
		url,
		method:'post',
		data: JSON.stringify(
            form
        )  
	})
	
	
export  const  RoleDetail = (url,code)=>
	request({
		url,//获取指定的角色
		method:'get',
		params: {
			code
		} 
	})
	
export  const  delRole = (url,code)=>
	request({
		url,//删除 角色
		method:'get',
		params: {
			code
		} 
	})

/*
	客户

*/
//获取客户用户列表
export  const  listCustomer = (search)=>
	request({
		url:'/sys/client_user/get_client_user_list',//
		method:'get',
		params: {
			pageNo:search.pageNo,
			pageSize:search.pageSize,
			keyWord:search.keyWord
		} 
	})

// 删除 客户用户
export  const  delCustomer = (code)=>
	request({
		url:'/sys/client_user/delete_client_user',//
		method:'get',
		params: {
			code
		} 
	})
	// 获取指定的客户用户
export  const  customerDetail = (code)=>
	request({
		url:'/sys/client_user/get_client_user',//
		method:'get',
		params: {
			code
		} 
	})